package cn.usbtg.jfinal.plugin.autoroute;

/**
 * http请求类型
 */
public enum HttpRequestMethod {
    GET,
    POST,
    PUT,
    HEAD,
    DELETE,
    PATCH,
    OPTIONS,
    TRACE;

    public static HttpRequestMethod parse(String method) {
        HttpRequestMethod[] items = HttpRequestMethod.values();
        for (HttpRequestMethod item : items) {
            if (item.toString().equalsIgnoreCase(method)) {
                return item;
            }
        }
        return null;
    }
}